<template>
  <div class="container">
    <div class="item">
      <QuickAccess />
    </div>
    <div class="item">
      <Reagovat />
    </div>
    <div class="item">
      <Task />
    </div>
    <div class="item">
      <Notice @more="emitMore" />
    </div>
    <div class="item" v-if="feishu_calendar">
      <FsCalendar/>
    </div>
  </div>
</template>
<script setup>
import QuickAccess from "./quickAccess/index.vue";
import Reagovat from "./reagovat/index.vue";
import Notice from "./notice/index.vue";
import Task from "./task/index.vue";
import FsCalendar from "./calendar/index.vue";
import { authList } from "@/auth/index.js";
import { isPermission } from "@/hooks/index.js";
// import useUserStore from "@/store/modules/user";
// const userData = useUserStore();
// const is_test_user = computed(() => userData.is_test_user);
const feishu_calendar = computed(() => isPermission(authList.calendar.feishu_calendar));
const emit = defineEmits(["moreEvent"]);
const emitMore = () => {
  emit("moreEvent");
};
</script>
<style lang="scss" scoped>
.container {
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  // height: 100%;
  padding: 10px;
  .item {
    padding: 8px;
    box-sizing: border-box;
    height: 41vh;
    // height: 100%;
    overflow: auto;
    word-wrap: break-word;
    border-radius: 8px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05), 0 -5px 10px rgba(0, 0, 0, 0.05),
      5px 0 10px rgba(0, 0, 0, 0.05), -5px 0 10px rgba(0, 0, 0, 0.05);
  }
}
</style>
